package com.cy.pj.common.service;

import com.cy.pj.common.cache.Cache;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

@Service
public class CacheService {
    private static Cache cache;


    @Autowired//可以描述构造方法
    public CacheService(@Qualifier("softCache") Cache cache){//@Qualifier可以描述参数
        this.cache=cache;
    }
    public static Cache getCache(){
        return  cache;
    }
}
